#include "OverUnderX.h"
#include "OverUnderVoltage.h"
#include "OverUnderFrequency.h"
#include "OverLoad.h"
#include "OverTemperature.h"
#include <stddef.h>
#include "../debug.h"
#include <pthread.h>
#include <unistd.h>
#include <sys/syscall.h>
#include "../misc.h"


void OverUnderX_Thread(void *pPara)
{
    Misc_InitThread(__func__);

    int tick=0;
    sleep(15); /* 等温度、电压、频率先采集一轮 */
    
    while(1)
    {
        tick++;
        OverUnderVoltage_Loop((void*)(0==tick%5));
        OverUnderFreq_Loop((void*)(0==tick%5));
        OverLoad_1SecondPerLoop(NULL);
        OverTemp_1SecondPerLoop((void*)(0==tick%5));
        sleep(1);
    }
}



